/**
 * 教师模块路由文件
 */

const Router = require('koa-router');
const router = new Router();
const { validAddEmergency, validUpdateEmergency } = require('../validators/teachers');
const { validate } = require('../validators/common');
const { addEmergency, updateEmergency, deleteEmergency, getEmergencyList } = require('../services/teachers');

router.prefix('/emergency');

router.post('/add', validate(validAddEmergency), addEmergency);

router.put('/update', validate(validUpdateEmergency), updateEmergency);

router.delete('/delete/:id', deleteEmergency);

router.get('/list/:id', getEmergencyList);

module.exports = router;